Optimal. Leaf size=412 \[ \frac {c \left (a+b \tanh ^{-1}(c x)\right )^2}{d}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{d x}-\frac {2 e \left (a+b \tanh ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )}{d^2}-\frac {e \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{d^2}+\frac {e \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d^2}+\frac {2 b c \left (a+b \tanh ^{-1}(c x)\right ) \log \left (2-\frac {2}{1+c x}\right )}{d}+\frac {b e \left (a+b \tanh ^{-1}(c x)\right ) \text {PolyLog}\left (2,1-\frac {2}{1-c x}\right )}{d^2}-\frac {b e \left (a+b \tanh ^{-1}(c x)\right ) \text {PolyLog}\left (2,-1+\frac {2}{1-c x}\right )}{d^2}+\frac {b e \left (a+b \tanh ^{-1}(c x)\right ) \text {PolyLog}\left (2,1-\frac {2}{1+c x}\right )}{d^2}-\frac {b^2 c \text {PolyLog}\left (2,-1+\frac {2}{1+c x}\right )}{d}-\frac {b e \left (a+b \tanh ^{-1}(c x)\right ) \text {PolyLog}\left (2,1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d^2}-\frac {b^2 e \text {PolyLog}\left (3,1-\frac {2}{1-c x}\right )}{2 d^2}+\frac {b^2 e \text {PolyLog}\left (3,-1+\frac {2}{1-c x}\right )}{2 d^2}+\frac {b^2 e \text {PolyLog}\left (3,1-\frac {2}{1+c x}\right )}{2 d^2}-\frac {b^2 e \text {PolyLog}\left (3,1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.43, antiderivative size = 412, normalized size of antiderivative = 1.00, number of steps
used = 13, number of rules used = 11, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.524, Rules used = {6087, 6037,
6135, 6079, 2497, 6033, 6199, 6095, 6205, 6745, 6059} \begin {gather*} \frac {b e \text {Li}_2\left (1-\frac {2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{d^2}-\frac {b e \text {Li}_2\left (\frac {2}{1-c x}-1\right ) \left (a+b \tanh ^{-1}(c x)\right )}{d^2}+\frac {b e \text {Li}_2\left (1-\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{d^2}-\frac {b e \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (c x+1)}\right )}{d^2}-\frac {2 e \tanh ^{-1}\left (1-\frac {2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )^2}{d^2}-\frac {e \log \left (\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )^2}{d^2}+\frac {e \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c x+1) (c d+e)}\right )}{d^2}+\frac {c \left (a+b \tanh ^{-1}(c x)\right )^2}{d}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{d x}+\frac {2 b c \log \left (2-\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{d}-\frac {b^2 e \text {Li}_3\left (1-\frac {2}{1-c x}\right )}{2 d^2}+\frac {b^2 e \text {Li}_3\left (\frac {2}{1-c x}-1\right )}{2 d^2}+\frac {b^2 e \text {Li}_3\left (1-\frac {2}{c x+1}\right )}{2 d^2}-\frac {b^2 e \text {Li}_3\left (1-\frac {2 c (d+e x)}{(c d+e) (c x+1)}\right )}{2 d^2}-\frac {b^2 c \text {Li}_2\left (\frac {2}{c x+1}-1\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2497
Rule 6033
Rule 6037
Rule 6059
Rule 6079
Rule 6087
Rule 6095
Rule 6135
Rule 6199
Rule 6205
Rule 6745
Rubi steps
\begin {align*} \int \frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{x^2 (d+e x)} \, dx &=\int \left (\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{d x^2}-\frac {e \left (a+b \tanh ^{-1}(c x)\right )^2}{d^2 x}+\frac {e^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{d^2 (d+e x)}\right ) \, dx\\ &=\frac {\int \frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{x^2} \, dx}{d}-\frac {e \int \frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{x} \, dx}{d^2}+\frac {e^2 \int \frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{d+e x} \, dx}{d^2}\\ &=-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{d x}-\frac {2 e \left (a+b \tanh ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )}{d^2}-\frac {e \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{d^2}+\frac {e \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d^2}+\frac {b e \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{d^2}-\frac {b e \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d^2}+\frac {b^2 e \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 d^2}-\frac {b^2 e \text {Li}_3\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 d^2}+\frac {(2 b c) \int \frac {a+b \tanh ^{-1}(c x)}{x \left (1-c^2 x^2\right )} \, dx}{d}+\frac {(4 b c e) \int \frac {\left (a+b \tanh ^{-1}(c x)\right ) \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx}{d^2}\\ &=\frac {c \left (a+b \tanh ^{-1}(c x)\right )^2}{d}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{d x}-\frac {2 e \left (a+b \tanh ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )}{d^2}-\frac {e \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{d^2}+\frac {e \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d^2}+\frac {b e \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{d^2}-\frac {b e \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d^2}+\frac {b^2 e \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 d^2}-\frac {b^2 e \text {Li}_3\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 d^2}+\frac {(2 b c) \int \frac {a+b \tanh ^{-1}(c x)}{x (1+c x)} \, dx}{d}-\frac {(2 b c e) \int \frac {\left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx}{d^2}+\frac {(2 b c e) \int \frac {\left (a+b \tanh ^{-1}(c x)\right ) \log \left (2-\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx}{d^2}\\ &=\frac {c \left (a+b \tanh ^{-1}(c x)\right )^2}{d}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{d x}-\frac {2 e \left (a+b \tanh ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )}{d^2}-\frac {e \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{d^2}+\frac {e \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d^2}+\frac {2 b c \left (a+b \tanh ^{-1}(c x)\right ) \log \left (2-\frac {2}{1+c x}\right )}{d}+\frac {b e \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1-c x}\right )}{d^2}-\frac {b e \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (-1+\frac {2}{1-c x}\right )}{d^2}+\frac {b e \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{d^2}-\frac {b e \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d^2}+\frac {b^2 e \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 d^2}-\frac {b^2 e \text {Li}_3\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 d^2}-\frac {\left (2 b^2 c^2\right ) \int \frac {\log \left (2-\frac {2}{1+c x}\right )}{1-c^2 x^2} \, dx}{d}-\frac {\left (b^2 c e\right ) \int \frac {\text {Li}_2\left (1-\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx}{d^2}+\frac {\left (b^2 c e\right ) \int \frac {\text {Li}_2\left (-1+\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx}{d^2}\\ &=\frac {c \left (a+b \tanh ^{-1}(c x)\right )^2}{d}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{d x}-\frac {2 e \left (a+b \tanh ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c x}\right )}{d^2}-\frac {e \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{d^2}+\frac {e \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d^2}+\frac {2 b c \left (a+b \tanh ^{-1}(c x)\right ) \log \left (2-\frac {2}{1+c x}\right )}{d}+\frac {b e \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1-c x}\right )}{d^2}-\frac {b e \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (-1+\frac {2}{1-c x}\right )}{d^2}+\frac {b e \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{d^2}-\frac {b^2 c \text {Li}_2\left (-1+\frac {2}{1+c x}\right )}{d}-\frac {b e \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{d^2}-\frac {b^2 e \text {Li}_3\left (1-\frac {2}{1-c x}\right )}{2 d^2}+\frac {b^2 e \text {Li}_3\left (-1+\frac {2}{1-c x}\right )}{2 d^2}+\frac {b^2 e \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 d^2}-\frac {b^2 e \text {Li}_3\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 9.76, size = 1188, normalized size = 2.88 \begin {gather*} -\frac {a^2}{d x}-\frac {a^2 e \log (x)}{d^2}+\frac {a^2 e \log (d+e x)}{d^2}+\frac {a b \left (i c d e \pi \tanh ^{-1}(c x)-\frac {2 c d^2 \tanh ^{-1}(c x)}{x}+2 c d e \tanh ^{-1}\left (\frac {c d}{e}\right ) \tanh ^{-1}(c x)-c d e \tanh ^{-1}(c x)^2+e^2 \tanh ^{-1}(c x)^2-\sqrt {1-\frac {c^2 d^2}{e^2}} e^2 e^{-\tanh ^{-1}\left (\frac {c d}{e}\right )} \tanh ^{-1}(c x)^2-2 c d e \tanh ^{-1}(c x) \log \left (1-e^{-2 \tanh ^{-1}(c x)}\right )-i c d e \pi \log \left (1+e^{2 \tanh ^{-1}(c x)}\right )+2 c d e \tanh ^{-1}\left (\frac {c d}{e}\right ) \log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )+2 c d e \tanh ^{-1}(c x) \log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )+2 c^2 d^2 \log \left (\frac {c x}{\sqrt {1-c^2 x^2}}\right )-\frac {1}{2} i c d e \pi \log \left (1-c^2 x^2\right )-2 c d e \tanh ^{-1}\left (\frac {c d}{e}\right ) \log \left (i \sinh \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )\right )+c d e \text {PolyLog}\left (2,e^{-2 \tanh ^{-1}(c x)}\right )-c d e \text {PolyLog}\left (2,e^{-2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )\right )}{c d^3}+\frac {b^2 \left (-i c d e \pi ^3+24 c^2 d^2 \tanh ^{-1}(c x)^2-\frac {24 c d^2 \tanh ^{-1}(c x)^2}{x}+8 c d e \tanh ^{-1}(c x)^3+8 e^2 \tanh ^{-1}(c x)^3+48 c^2 d^2 \tanh ^{-1}(c x) \log \left (1-e^{-2 \tanh ^{-1}(c x)}\right )-24 c d e \tanh ^{-1}(c x)^2 \log \left (1-e^{2 \tanh ^{-1}(c x)}\right )-24 c^2 d^2 \text {PolyLog}\left (2,e^{-2 \tanh ^{-1}(c x)}\right )-24 c d e \tanh ^{-1}(c x) \text {PolyLog}\left (2,e^{2 \tanh ^{-1}(c x)}\right )+12 c d e \text {PolyLog}\left (3,e^{2 \tanh ^{-1}(c x)}\right )\right )}{24 c d^3}+\frac {b^2 (c d-e) e (c d+e) \left (-6 c d \tanh ^{-1}(c x)^3+2 e \tanh ^{-1}(c x)^3-4 \sqrt {1-\frac {c^2 d^2}{e^2}} e e^{-\tanh ^{-1}\left (\frac {c d}{e}\right )} \tanh ^{-1}(c x)^3-6 i c d \pi \tanh ^{-1}(c x) \log \left (\frac {1}{2} \left (e^{-\tanh ^{-1}(c x)}+e^{\tanh ^{-1}(c x)}\right )\right )-6 c d \tanh ^{-1}(c x)^2 \log \left (1+\frac {(c d+e) e^{2 \tanh ^{-1}(c x)}}{c d-e}\right )+6 c d \tanh ^{-1}(c x)^2 \log \left (1-e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right )+6 c d \tanh ^{-1}(c x)^2 \log \left (1+e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right )+6 c d \tanh ^{-1}(c x)^2 \log \left (1-e^{2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )+12 c d \tanh ^{-1}\left (\frac {c d}{e}\right ) \tanh ^{-1}(c x) \log \left (\frac {1}{2} i e^{-\tanh ^{-1}\left (\frac {c d}{e}\right )-\tanh ^{-1}(c x)} \left (-1+e^{2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )\right )+6 c d \tanh ^{-1}(c x)^2 \log \left (\frac {1}{2} e^{-\tanh ^{-1}(c x)} \left (e \left (-1+e^{2 \tanh ^{-1}(c x)}\right )+c d \left (1+e^{2 \tanh ^{-1}(c x)}\right )\right )\right )-6 c d \tanh ^{-1}(c x)^2 \log \left (\frac {c (d+e x)}{\sqrt {1-c^2 x^2}}\right )-3 i c d \pi \tanh ^{-1}(c x) \log \left (1-c^2 x^2\right )-12 c d \tanh ^{-1}\left (\frac {c d}{e}\right ) \tanh ^{-1}(c x) \log \left (i \sinh \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )\right )-6 c d \tanh ^{-1}(c x) \text {PolyLog}\left (2,-\frac {(c d+e) e^{2 \tanh ^{-1}(c x)}}{c d-e}\right )+12 c d \tanh ^{-1}(c x) \text {PolyLog}\left (2,-e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right )+12 c d \tanh ^{-1}(c x) \text {PolyLog}\left (2,e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right )+6 c d \tanh ^{-1}(c x) \text {PolyLog}\left (2,e^{2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )+3 c d \text {PolyLog}\left (3,-\frac {(c d+e) e^{2 \tanh ^{-1}(c x)}}{c d-e}\right )-12 c d \text {PolyLog}\left (3,-e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right )-12 c d \text {PolyLog}\left (3,e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right )-3 c d \text {PolyLog}\left (3,e^{2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )\right )}{d^3 \left (6 c^3 d^2-6 c e^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 37.68, size = 26972, normalized size = 65.47
method | result | size |
derivativedivides | \(\text {Expression too large to display}\) | \(26972\) |
default | \(\text {Expression too large to display}\) | \(26972\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \operatorname {atanh}{\left (c x \right )}\right )^{2}}{x^{2} \left (d + e x\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a+b\,\mathrm {atanh}\left (c\,x\right )\right )}^2}{x^2\,\left (d+e\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________